<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>let声明学习</title>
  <script type="text/javascript">
    // let作用域于代码块上
    {
      let num = 10;
      console.log("num = ", num);
    }
    // console.log("num = ", num);
    // 同作用域let变量只能声明一次
    let num1 = 11;
    // let num1 = 22;
    console.log("num1 = ", num1);
    // let不存在变量提升
    console.log("num2 = ", num2);//报错
    let num2 = 22;
  </script>
</head>
<body>
</body>
</html>
